﻿using Microsoft.EntityFrameworkCore;
using Project.Net.Infra.Entity;
using Project.Net.Infra.Maps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Net.Infra.Data
{
    /// <summary>
    /// 
    /// </summary>
    public class AppDbContext: DbContext
    {
        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
        {
            // 构造函数实现
        }
        /// <summary>
        /// 
        /// </summary>
        public DbSet<UserModel> UserModels { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new UserModelMap());
        }
    }
}
